import request from '@/util/request'

export function ttsVoice(obj) {
  return request({
    url: '/oss/voice/tts',
    method: 'post',
    data:obj
  })
}

export function isResourceExist(url) {
  if(url.startsWith('/api')||url.startsWith(document.location.origin)) return fetch(url,{method:'head'})
  else return {
        then:function(callback){
          callback({status:200})
        }
      }
}